home *** CD-ROM | disk | FTP | other *** search
- ## spawn_console
- # This script tests all the various flavors of spawn:
- # 1. Asynchronous spawn of batch file
- # 2. Asynchronous spawn of batch file (detached)
- # 3. Synchronous spawn of batch file
- # 4. Asynchronous spawn of EXE file
- # 5. Asynchronous spawn of EXE file (detached)
- # 6. Synchronous spawn of EXE file
- # Assumptions:
- # 1. a batch file ConsoleTest.bat exists in the PATH (prints commandline)
- # 3. an EXE file ConsoleExe.exe exists in the PATH (prints commandline)
- #
- {
- -name spawn_console
- -start
- -stop
-
- ##########################################################################
- ## Spawn batch files:
-
- # Asynchronous Spawn of a batch file *SUCCEEDS*
- # -command ConsoleTest hello world (asynchronous)
-
- # Asynchronous Detached Spawn of a batch file *FAILS*
- # -command -detach ConsoleTest hello world (detach)
-
- # Asynchronous Detached Spawn of CMD.EXE to execute a command *SUCCEEDS*
- # -command -detach cmd /c copy c:\temp\foo.txt c:\temp\foo.fox
-
- # Synchronous Spawn of a batch file *SUCCEEDS*
- # -command -wait ConsoleTest hello world (synchronous)
-
- ##########################################################################
- ## Spawn .EXE files:
-
- # Asynchronous Spawn of a .EXE file *SUCCEEDS*
- # -command ConsoleExe hello world (asynchronous)
-
- # Asynchronous Detached Spawn of a .EXE file *SUCCEEDS*
- # -command -detach ConsoleExe hello world (detach)
-
- # Synchronous Spawn of a .EXE file *SUCCEEDS*
- # -command -wait ConsoleExe hello world (synchronous)
-
- -action -print ok detach test complete!
- }
-